home *** CD-ROM | disk | FTP | other *** search
-
- ##################################################
- ### Ruleset 4 -- Final Output Post-rewriting ###
- ##################################################
- S4
-
- R$*<@> $@ $1 handle <> and list:;
-
- # strip trailing dot off possibly canonical name
- R$* < @ $+ . > $* $1 < @ $2 > $3
-
- # externalize local domain info
- R$* < $+ > $* $1 $2 $3 defocus
- R@ $+ : @ $+ : $+ @ $1 , @ $2 : $3 <route-addr> canonical
- R@ $* $@ @ $1 ... and exit
-
-
- # delete duplicate local names
- R$+ % $=w @ $=w $1 @ $j u%host@host => u@host
-
-
-
- ##############################################################
- ### Ruleset 97 -- recanonicalize and call ruleset zero ###
- ### (used for recursive calls) ###
- ##############################################################
-
- S97
- R$* $: $>3 $1
- R$* $@ $>0 $1
-
- ###########################################################################
- ### Ruleset 5 -- special rewriting after aliases have been expanded ###
- ### (new sendmail only) ###
- ###########################################################################
-
- S5
-
- # see if we have a relay or a hub
- R$+ $: < $R > $1 try relay
- R< > $+ $: < $H > $1 try hub
- R< > $+ $@ $1 nope, give up
- R< $- : $+ > $+ $: $>95 < $1 : $2 > $3 < @ $2 >
- R< $+ > $+ $@ $>95 < $1 > $2 < @ $1 >
-
-
- ###################################################################
- ### Ruleset 90 -- try domain part of mailertable entry ###
- ### (new sendmail only) ###
- ###################################################################
-
- S90
- R$* <$- . $+ > $* $: $1$2 < $(mailertable .$3 $@ $1$2 $@ $2 $) > $4
- R$* <$- : $+ > $* $# $2 $@ $3 $: $4 check -- resolved?
- R$* < . $+ > $* $@ $>90 $1 . <$2> $3 no -- strip & try again
- R$* < $* > $* $: < $(mailertable . $@ $1$2 $) > $3 try "."
- R<$- : $+ > $* $# $1 $@ $2 $: $3 "." found?
- R< $* > $* $@ $2 no mailertable match
-
- ###################################################################
- ### Ruleset 95 -- canonify mailer:host syntax to triple ###
- ###################################################################
-
- S95
- R< > $* $@ $1 strip off null relay
- R< $- : $+ > $* $# $1 $@ $2 $: $3 try qualified mailer
- R< $=w > $* $@ $2 delete local host
- R< $+ > $* $#$N $@ $1 $: $2 use unqualified mailer
-
- ###################################################################
- ### Ruleset 98 -- local part of ruleset zero (can be null) ###
- ###################################################################
-
- S98
-
- # addresses sent to foo@host.REDIRECT will give a 551 error code
- R$* < @ $+ .REDIRECT. > $# error $@ NOUSER $: "551 User not local; please try " <$1@$2>
- ######################################################################
- ######################################################################
- #####
- ##### MAILER DEFINITIONS
- #####
- ######################################################################
- ######################################################################
-
- S10
- R<@> $n errors to mailer-daemon
- R$+ $: $>40 $1
-
- S20
- R$+ < @ $* > $: $1 strip host part
-
- S40
-
- #
- # envelope sender and masquerading recipient rewriting
- #
- S11
- R$+ $: $>51 $1 sender/recipient common
- R$* :; <@> $@ $1 :; list:; special case
- R$* $@ $>61 $1 qualify unqual'ed names
-
-
- #
- # header recipient rewriting if not masquerading recipients
- #
- S21
-
- # do sender/recipient common rewriting
- R$+ $: $>51 $1
-
- # unqualified names (e.g., "eric") are qualified by local host
- R$* < @ $* > $* $@ $1 < @ $2 > $3 already qualified
- R$+ $: $1 < @ $j > add local domain
-
-
- #
- # header sender and masquerading recipient rewriting
- #
- S31
- R$+ $: $>51 $1 sender/recipient common
- R$* :; <@> $@ $1 :; list:; special case
-
- # do special header rewriting
- R$* <@> $* $@ $1 <@> $2 pass null host through
- R< @ $* > $* $@ < @ $1 > $2 pass route-addr through
- R$=E < @ $=w . > $@ $1 < @ $2 > exposed user as is
- R$* < @ $=w . > $: $1 < @ $2 @ $M > masquerade as domain
- R$* < @ $+ @ > $@ $1 < @ $2 > in case $M undefined
- R$* < @ $+ @ $+ > $@ $1 < @ $3 > $M is defined -- use it
- R$* $@ $>61 $1 qualify unqual'ed names
-
-
- #
- # convert pseudo-domain addresses to real domain addresses
- #
- S51
-
- # pass <route-addr>s through
- R< @ $+ > $* $@ < @ $1 > $2 resolve <route-addr>
-
- # output fake domains as user%fake@relay
- R$+ <@ $+ .BITNET. > $: $1 % $2 .BITNET < @ $B > user@host.BITNET
- R$+.BITNET <@ $+:$+ > $: $1 .BITNET < @ $3 > strip mailer: part
-
- # do UUCP heuristics; note that these are shared with UUCP mailers
- R$+ < @ $+ .UUCP. > $: < $2 ! > $1 convert to UUCP form
- R$+ < @ $* > $* $@ $1 < @ $2 > $3 not UUCP form
-
- # leave these in .UUCP form to avoid further tampering
- R< $&h ! > $- ! $+ $@ $2 < @ $1 .UUCP. >
- R< $&h ! > $-.$+ ! $+ $@ $3 < @ $1.$2 >
- R< $&h ! > $+ $@ $1 < @ $&h .UUCP. >
- R< $+ ! > $+ $: $1 ! $2 < @ $Y >
- R$+ < @ > $: $1 < @ $j > in case $Y undefined
- R$+ < @ $+ : $+ > $: $1 < @ $3 > strip mailer: part
-
-
- #
- # common sender and masquerading recipient rewriting
- #
- S61
-
- R$* < @ $* > $* $@ $1 < @ $2 > $3 already qualified
- R$=E $@ $1 < @ $j> show exposed names
- R$+ $: $1 < @ $M > user w/o host
- R$+ <@> $: $1 < @ $j > in case $M undefined
-
- #
- # envelope and header sender rewriting
- #
- S12
-
- # handle error address as a special case
- R<@> $n errors to mailer-daemon
-
- # do not qualify list:; syntax
- R$* :; <@> $@ $1 :;
-
- R$* < @ $* . > $1 < @ $2 > strip trailing dots
- R$* < @ $=w > $1 strip local name
- R<@ $- . UUCP > : $+ $1 ! $2 convert to UUCP format
- R<@ $+ > : $+ $1 ! $2 convert to UUCP format
- R$* < @ $- . UUCP > $2 ! $1 convert to UUCP format
- R$* < @ $+ > $2 ! $1 convert to UUCP format
- R$&h ! $+ ! $+ $@ $1 ! $2 $h!...!user => ...!user
- R$&h ! $+ $@ $&h ! $1 $h!user => $h!user
- R$+ $: $U ! $1 prepend our name
- R! $+ $: $k ! $1 in case $U undefined
-
- #
- # envelope recipient rewriting
- #
- S22
-
- # don't touch list:; syntax
- R$* :; <@> $@ $1 :;
-
- R$* < @ $* . > $1 < @ $2 > strip trailing dots
- R$* < @ $j > $1 strip local name
- R<@ $- . UUCP > : $+ $1 ! $2 convert to UUCP format
- R<@ $+ > : $+ $1 ! $2 convert to UUCP format
- R$* < @ $- . UUCP > $2 ! $1 convert to UUCP format
- R$* < @ $+ > $2 ! $1 convert to UUCP format
-
- #
- # header recipient rewriting
- #
- S42
-
- # don't touch list:; syntax
- R$* :; <@> $@ $1 :;
-
- R$* < @ $* . > $1 < @ $2 > strip trailing dots
- R$* < @ $j > $1 strip local name
- R<@ $- . UUCP > : $+ $1 ! $2 convert to UUCP format
- R<@ $+ > : $+ $1 ! $2 convert to UUCP format
- R$* < @ $- . UUCP > $2 ! $1 convert to UUCP format
- R$* < @ $+ > $2 ! $1 convert to UUCP format
- R$&h ! $+ ! $+ $@ $1 ! $2 $h!...!user => ...!user
- R$&h ! $+ $@ $&h ! $1 $h!user => $h!user
- R$+ $: $U ! $1 prepend our name
- R! $+ $: $k ! $1 in case $U undefined
-
-
- #
- # envelope sender rewriting for uucp-dom mailer
- #
- S52
-
- # handle error address as a special case
- R<@> $n errors to mailer-daemon
-
- # pass everything to standard SMTP mailer rewriting
- R$* $@ $>11 $1
-
- #
- # envelope sender rewriting for uucp-uudom mailer
- #
- S72
-
- # handle error address as a special case
- R<@> $n errors to mailer-daemon
-
- # do not qualify list:; syntax
- R$* :; <@> $@ $1 :;
-
- R$* < @ $* . > $1 < @ $2 > strip trailing dots
- R$* < @ $=w > $1 strip local name
- R<@ $- . UUCP > : $+ $1 ! $2 convert to UUCP format
- R<@ $+ > : $+ $1 ! $2 convert to UUCP format
- R$* < @ $- . UUCP > $2 ! $1 convert to UUCP format
- R$* < @ $+ > $@ $2 ! $1 convert to UUCP format
-
- R$&h ! $+ ! $+ $@ $1 ! $2 $h!...!user => ...!user
- R$&h ! $+ $@ $&h ! $1 $h!user => $h!user
- R$+ $: $M ! $1 prepend masquerade name
- R! $+ $: $j ! $1 in case $M undefined
-
-
-